package com.binc.testspring.common.handler;

import io.swagger.annotations.ApiModelProperty;

import java.util.List;

public class DictTypeDto {
    @ApiModelProperty("字典编码")
    private String code;
    @ApiModelProperty("字典列表对象")
    private List<DictDataDto> dictDataDtos;

    public DictTypeDto() {
    }

    public String getCode() {
        return this.code;
    }

    public List<DictDataDto> getDictDataDtos() {
        return this.dictDataDtos;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public void setDictDataDtos(List<DictDataDto> dictDataDtos) {
        this.dictDataDtos = dictDataDtos;
    }

    @Override
    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof DictTypeDto)) {
            return false;
        } else {
            DictTypeDto other = (DictTypeDto)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$code = this.getCode();
                Object other$code = other.getCode();
                if (this$code == null) {
                    if (other$code != null) {
                        return false;
                    }
                } else if (!this$code.equals(other$code)) {
                    return false;
                }

                Object this$dictDataDtos = this.getDictDataDtos();
                Object other$dictDataDtos = other.getDictDataDtos();
                if (this$dictDataDtos == null) {
                    if (other$dictDataDtos != null) {
                        return false;
                    }
                } else if (!this$dictDataDtos.equals(other$dictDataDtos)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof DictTypeDto;
    }

    @Override
    public int hashCode() {
        boolean PRIME = true;
        int result = 1;
        Object $code = this.getCode();
        result = result * 59 + ($code == null ? 43 : $code.hashCode());
        Object $dictDataDtos = this.getDictDataDtos();
        result = result * 59 + ($dictDataDtos == null ? 43 : $dictDataDtos.hashCode());
        return result;
    }

    @Override
    public String toString() {
        return "DictTypeDto(code=" + this.getCode() + ", dictDataDtos=" + this.getDictDataDtos() + ")";
    }
}